package gold.digger;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC190 {

    public int reverseBits(int n) {
        int res = 0;
        for (int i = 31; n != 0; --i) {
            res += (n & 1) << i;
            n = n >>> 1;
        }

        return res;
    }


    public static void main(String[] args) {
        LC190 an = new LC190();
        System.out.println(an.reverseBits(43261596));
    }
}
